<center>
  <span style="font-size:25px;"><%=@player.name%> [<%=@player.custom_name%>] - Cash Flow Statement</span><br/><br/>
<table class="allboder">
  <tr align="left">
    <td colspan="2"><b>กิจกรรมดำเนินงาน</b></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;กำไรสุทธิ</td>
    <td align="right"><%=number_with_delimiter(@pb.net_income)%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;+ ค่าเสื่อมราคา</td>
    <td align="right"><%=number_with_delimiter(@pb.depreciation)%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;- &#916; สัญญาซื้อขายล่วงหน้า</td>
    <td align="right"><%=number_with_delimiter(@last_pb.futures - @pb.futures)%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;+ &#916; เจ้าหนี้การค้า</td>
    <td align="right"><%=number_with_delimiter(@pb.ap - @last_pb.ap)%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;- &#916; ลูกหนี้การค้า</td>
    <td align="right"><%=number_with_delimiter(@last_pb.ar - @pb.ar)%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;- &#916; สินค้าคงเหลือ</td>
    <td align="right"><%=number_with_delimiter((@last_pb.rawmat_cost + @last_pb.inventory_cost) - (@pb.rawmat_cost + @pb.inventory_cost))%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;= เงินสดจากกิจกรรมดำเนินงาน</td>
    <td align="right"><%=number_with_delimiter(@pb.net_income + @pb.depreciation + (@last_pb.futures - @pb.futures) + (@pb.ap - @last_pb.ap) + (@last_pb.ar - @pb.ar) + ((@last_pb.rawmat_cost + @last_pb.inventory_cost) - (@pb.rawmat_cost + @pb.inventory_cost)))%></td>
  </tr>
  <tr align="left">
    <td colspan="2"><b>กิจกรรมลงทุน</b></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;- เงินลงทุนในสินทรัพย์ถาวรในปีนี้</td>
    <td align="right"><%=number_with_delimiter(@cap_ex)%><%#=number_with_delimiter(-1 * ((@pb.net_income + @pb.depreciation + (@pb.ap - @last_pb.ap) + (@last_pb.ar - @pb.ar) + ((@last_pb.rawmat_cost + @last_pb.inventory_cost) - (@pb.rawmat_cost + @pb.inventory_cost))) - (@pb.cash - @last_pb.cash) + (@pb.emergency_debt - @last_pb.emergency_debt) + (@debts_value - @last_debts_value)))%></td>
  </tr>
  <tr align="left">
    <td colspan="2"><b>กิจกรรมจัดหาทุน</b></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;+ &#916; เงินกู้ฉุกเฉิน</td>
    <td align="right"><%=number_with_delimiter(@pb.emergency_debt - @last_pb.emergency_debt)%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;+ &#916; เงินกู้ระยะยาว</td>
    <td align="right"><%=number_with_delimiter(@debts_value - @last_debts_value)%></td>
  </tr>
  <tr align="left">
    <td>&nbsp;&nbsp;&nbsp;&nbsp;+ &#916; ออกหุ้นเพิ่มทุน</td>
    <td align="right"><%=number_with_delimiter((@pb.common_stock + @pb.retain_earning) - (@last_pb.common_stock + @last_pb.retain_earning + @pb.net_income))%></td>
  </tr>
  <tr align="left">
    <td><b>รวมกระแสเงินสด</b></td>
    <td align="right"><%=number_with_delimiter(@pb.cash - @last_pb.cash)%></td>
  </tr>
  <tr align="left">
    <td><b>เงินสดต้นปี</b></td>
    <td align="right"><%=number_with_delimiter(@last_pb.cash)%></td>
  </tr>
  <tr align="left">
    <td><b>เงินสดปลายปี</b></td>
    <td align="right"><%=number_with_delimiter(@pb.cash)%></td>
  </tr>
</table>
</center>